View Issue Details

IDProjectCategoryView StatusLast Update
0001585T99X171.00 SKB EaglexTS certificationpublic2023-01-31 18:36
Reporter(SW) Jason LingAssigned To(SW) Jason LingDue Date
PrioritynormalSeveritys4-minorReproducibilityalways
Status closedResolutionfixed 
Summary0001585: [Smart3][ATV12] side effect of vold patch
DescriptionHi YK,

There is a CTS module (CtsScopedStorageDeviceOnlyTest)

Command: run cts -m CtsScopedStorageDeviceOnlyTest

There are 223 failures in this moudle (CtsScopedStorageDeviceOnlyTest-fail.jpg).
After we revert the SPTEK's patch, we can get all pass results in this module. (CtsScopedStorageDeviceOnlyTest-pass.jpg)
(patch's path: system/vold/, please refer to vold.jpg)

Please help us confirm it with SPTEK.

Thanks,
Jason
TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List (SW) Kerwin Chen , (SW) Sam Yang

Activities

(SW) Jason Ling

2022-12-26 11:37

developer  

vold.jpg (27,825 bytes)   
vold.jpg (27,825 bytes)   

(ALTech) Younkwang Jung

2022-12-26 12:48

developer   ~0011570

Hi Jason

I reported this issue to SPTEK
https://jira.skbroadband.com/browse/FSTB12-25

Thank you
YK.Jung

(ALTech) Younkwang Jung

2022-12-26 18:14

developer   ~0011579

Hi Jason

This issue is not occurring in other manufacturers. only observed on FXN models.
(FYI, the vold side is implemented by each manufacturer.)
First of all, the patch was modified by SPTEK and FXN at ATV10.
and SPTEK applied the patch to ATV12.

So we need to know if it was caused by the modification of FXN or the modification of SPTEK.
Please check the cause of this issue and let me know.

Thank you
YK.Jung

(SW) Sam Yang

2022-12-29 14:28

developer   ~0011606

Hi Younkwang

From CTS failed log, it shows some error message about setuping storage directory :
I/ModuleListener: [8/230] android.scopedstorage.cts.device.BypassDatabaseOperationsTest#testManageExternalStorage_DoesntBypassDatabase_afterS[volume=volume_public] FAILURE: Could not setup default dir [/storage/0BEF-1311/Alarms]
expected to be true

So I disable only "USB mount point name" part of Sptek modification and try again:
system/vold/model/PublicVolume.cpp:
@@ -143,7 +143,7 @@ status_t PublicVolume::doMount() {
     stableName = "sdcard3";
 #endif

-#if 1 //SPTEK: Change USB mount point name to sdcard#
+#if 0 //SPTEK: Change USB mount point name to sdcard#
     //const std::string DEFAULT_MOUNT_NAME("/storage/sdcard");
     const std::string DEFAULT_MOUNT_NAME("/mnt/media_rw/sdcard");
     int nIndex=1;

then the CTS module passes.
And we find that AVT10 CTS doesn't have this test module, so there is no problem on ATV10.
Could you take a other vendor's device (ATV12) to test this module for make sure they can pass this test?

(ALTech) Younkwang Jung

2023-01-02 10:53

developer   ~0011620

Hi Sam

I reported it to SPTEK

Thank you
YK.Jung

(ALTech) Younkwang Jung

2023-01-04 18:23

developer   ~0011659

Hi Sam

This fail occurs if the mount name is changed from original uuid to sdcard.
If FW use the original uuid for the mount name, this test is passed
However, some apps that use the "sdcard" path have problems.

To satisfy both cases, SPTEK is considering the following.
- only change uuid to sdcard when actual usb device is connected
- Use uuid as it is when the actual usb device is not connected (for Google test)

SPTEK think that this test case does not actually connect usb devices.
Is it correct?

Thank you
YK.Jung

(SW) Sam Yang

2023-01-05 09:51

developer   ~0011668

Last edited: 2023-01-05 09:52

Hi Younkwang

Yes, correct.
It doesn't need to connect actually USB devices.
Thanks~

(ALTech) Younkwang Jung

2023-01-06 12:17

developer   ~0011691

Hi Sam

SPTEK is currently reviewing UUID.
but , the problem is that if SPTEK modify it with UUID, some other apps need to be modified.(this takes a long time.)
First of all, SPTEK/SKB would like to modify it to WK by checking whether the Physical USB is connected or not

That is, SPTEK thinks as follows.

if [check Physical usb connection] == yes
   change UUID to sdcard
else
   use UUID [for goolge test]

Please check how SPTEK can know that USB is physically connected.

Thank you
YK.Jung

(SW) Sam Yang

2023-01-06 18:20

developer   ~0011702

Last edited: 2023-01-06 18:21

Hi YK,

I think they can use the storage label(name) to know the storage is physical or not.
Like logs below show, the physical storage device has a label name "CUBES", but the virtual one's is null:

physical device:
01-06 19:04:02.857 3130 3378 D vold : -->serno= 08B2-D6E6, label_len=5, label = CUBES
01-06 19:04:02.857 3130 3378 D vold : HAVE_DLOPEN -->ret= 1, fat usb label = CUBES
01-06 19:04:02.857 3130 3378 D vold : /dev/block/vold/public:8,1: LABEL="CUBES" UUID="08B2-D6E6" TYPE="vfat"
01-06 19:04:02.859 3130 3378 D vold : /system/bin/fsck_msdos
01-06 19:04:02.859 3130 3378 D vold : -p

virtual:
12-28 11:43:58.638 root 3130 11007 D vold : -->serno= 0BEF-1311, label_len=0, label = (null)
12-28 11:43:58.638 root 3130 11007 D vold : /dev/block/vold/public:7,1: UUID="0BEF-1311" TYPE="vfat"
12-28 11:43:58.639 root 3130 11007 D vold : /system/bin/fsck_msdos
12-28 11:43:58.640 root 3130 11007 D vold : -p

Thanks~
Sam

(ALTech) Younkwang Jung

2023-01-09 08:40

developer   ~0011709

Hi Sam

I checked the method.
I connected the USB device to the Window PC and deleted the name of the USB device.
Then, I connected the USB device to STB and found that the label was (null).
In other words, the label name can also be displayed as null when you connect the physical usb device.

Please check again if there is a way to check it accurately.

Thanks
YK.Jung
physical_usb_connect.PNG (166,253 bytes)   
physical_usb_connect.PNG (166,253 bytes)   

(SW) Sam Yang

2023-01-09 15:44

developer   ~0011723

Last edited: 2023-01-09 15:58

Hi YK

I think the method of recognizing "label" doesn't work well.
There are two other methods:

1. Recognize physical devices from UsbHostManager storage information:
    Because Sptek is familiar at framework, I think they can recognize physical devices from UsbHostManager service information(manufacturer name, product name,..., etc.). There are some device information in logs:
    "UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/002/003,mVendorId=1921,mProductId=21905,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=SanDisk,mProductName=Ultra USB 3.0,mVersion=1.00,mSerialNumberReader=com.android.server.usb.UsbSerialReader@dc7daed, mHasAudioPlayback=false, mHasAudioCapture=false, mHasMidi=false, mHasVideoCapture=false, mHasVideoPlayback=false, mConfigurations=["

2. If Sptek can't recognize the physical devices, for work around, they can recognize the cts test is running:
    They can detect the apk package "android.scopedstorage.cts.device" is installed, and don't rename storage name in this condition.
    (12-28 10:43:21 D/TestAppInstallSetup: Installing apk android.scopedstorage.cts.device with [/home/cts_user/xTS/android-cts/tools/../../android-cts/testcases/CtsScopedStorageDeviceOnlyTest.apk] ...)

Thanks~
Sam

(ALTech) Younkwang Jung

2023-01-09 17:43

developer   ~0011726

Hi Sam

The today meeting with SKB just ended. it has been decided that all contents related to vold will be changed from sdcard to uuid.
SPTEK will modify it.

And as far as I know, attdaemon uses sdcard string.
I think FXN just need to modify the attdaemon afterwards.

Thank you
YK.Jung

(ALTech) Younkwang Jung

2023-01-11 16:21

developer   ~0011744

Hi Sam

SPTEK is verifying that it changed to UUID and SPTEK will commit after verification is completed.
I'll let you know when SPTEK commits.

Thank you
YK.Jung

(ALTech) Younkwang Jung

2023-01-13 08:29

developer   ~0011755

Hi Sam

The code to change to sdcard was removed from SPTEK.

All parts(doUnmount.. etc. ) of FXN code that access sdcard need to be changed.
Please check it
Thank you
YK.Jung
vold.PNG (34,519 bytes)   
vold.PNG (34,519 bytes)   

(SW) Sam Yang

2023-01-13 15:29

developer   ~0011773

Hi YK,

OK, I'll check it.

Thanks~
Sam

(SW) Sam Yang

2023-01-13 18:11

developer   ~0011777

Hi YK,

The issue is fixed, thanks.

Sam

(SW) Sam Yang

2023-01-31 17:41

developer   ~0011918

Confirm with version "537r03".

Issue History

Date Modified Username Field Change
2022-12-26 11:37 (SW) Jason Ling New Issue
2022-12-26 11:37 (SW) Jason Ling Status new => assigned
2022-12-26 11:37 (SW) Jason Ling Assigned To => (ALTech) Younkwang Jung
2022-12-26 11:37 (SW) Jason Ling File Added: vold.jpg
2022-12-26 11:37 (SW) Jason Ling File Added: CtsScopedStorageDeviceOnlyTest-pass.jpg
2022-12-26 11:37 (SW) Jason Ling File Added: CtsScopedStorageDeviceOnlyTest-fail.jpg
2022-12-26 11:38 (SW) Jason Ling Issue Monitored: (SW) Sam Yang
2022-12-26 11:38 (SW) Jason Ling Issue Monitored: (SW) Kerwin Chen
2022-12-26 12:48 (ALTech) Younkwang Jung Note Added: 0011570
2022-12-26 18:14 (ALTech) Younkwang Jung Note Added: 0011579
2022-12-29 14:28 (SW) Sam Yang Note Added: 0011606
2023-01-02 10:53 (ALTech) Younkwang Jung Note Added: 0011620
2023-01-04 18:23 (ALTech) Younkwang Jung Note Added: 0011659
2023-01-05 09:51 (SW) Sam Yang Note Added: 0011668
2023-01-05 09:52 (SW) Sam Yang Note Edited: 0011668
2023-01-05 20:17 (SW) Jason Ling Category SW Issue => xTS certification
2023-01-06 12:17 (ALTech) Younkwang Jung Note Added: 0011691
2023-01-06 18:20 (SW) Sam Yang Note Added: 0011702
2023-01-06 18:21 (SW) Sam Yang Note Edited: 0011702
2023-01-09 08:40 (ALTech) Younkwang Jung Note Added: 0011709
2023-01-09 08:40 (ALTech) Younkwang Jung File Added: physical_usb_connect.PNG
2023-01-09 15:44 (SW) Sam Yang Note Added: 0011723
2023-01-09 15:47 (SW) Sam Yang Note Edited: 0011723
2023-01-09 15:49 (SW) Sam Yang Note Edited: 0011723
2023-01-09 15:58 (SW) Sam Yang Note Edited: 0011723
2023-01-09 17:43 (ALTech) Younkwang Jung Note Added: 0011726
2023-01-11 16:21 (ALTech) Younkwang Jung Note Added: 0011744
2023-01-13 08:29 (ALTech) Younkwang Jung Note Added: 0011755
2023-01-13 08:29 (ALTech) Younkwang Jung File Added: vold.PNG
2023-01-13 15:29 (SW) Sam Yang Note Added: 0011773
2023-01-13 18:11 (SW) Sam Yang Note Added: 0011777
2023-01-31 17:41 (SW) Sam Yang Assigned To (ALTech) Younkwang Jung => (SW) Jason Ling
2023-01-31 17:41 (SW) Sam Yang Status assigned => resolved
2023-01-31 17:41 (SW) Sam Yang Resolution open => fixed
2023-01-31 17:41 (SW) Sam Yang Note Added: 0011918
2023-01-31 18:36 (SW) Jason Ling Status resolved => closed